package cn.wgx.common.base;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import springfox.documentation.annotations.ApiIgnore;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

@Data
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = 239048290555l;

    @JsonIgnore
    @ApiModelProperty("创建时间")
//    @JSONField(serialize = false)
    protected Date createDate;

//    @JSONField(serialize = false)
    @JsonIgnore
    protected Integer createUserId;

    @JSONField(serialize = false)
    @JsonIgnore
    protected Date updateDate;

    @JSONField(serialize = false)
    @JsonIgnore
    protected Integer updateUserId;

    @JSONField(name = "_result",serialize = false)
    @TableField(exist = false)
    @JsonIgnore
    protected Integer _result = 0;

    @JSONField(serialize = false)
    @TableField(exist = false)
    @JsonIgnore
    protected boolean insert = false;

    @JSONField(serialize = false)
    @TableField(exist = false)
    @JsonIgnore
    protected boolean update = false;


    /**
     * 公共查询条件 - 日期起
     */
    @JSONField(name = "_starDate",serialize = false)
    @TableField(exist = false)
    @JsonIgnore
    protected Date _sDate;

    /**
     * 公共查询条件 - 日期止
     */
    @JSONField(name = "_endDate",serialize = false)
    @TableField(exist = false)
    @JsonIgnore
    protected Date _eDate;


    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Integer getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Integer updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Integer get_result() {
        return _result;
    }

    public void set_result(Integer _result) {
        this._result = _result;
    }

    public boolean isInsert() {
        return insert;
    }

    public void setInsert(boolean insert) {
        this.insert = insert;
    }

    public boolean isUpdate() {
        return update;
    }

    public void setUpdate(boolean update) {
        this.update = update;
    }

    public Date get_sDate() {
        return _sDate;
    }

    public void set_sDate(Date _sDate) {
        this._sDate = _sDate;
    }

    public Date get_eDate() {
        return _eDate;
    }

    public void set_eDate(Date _eDate) {
        this._eDate = _eDate;
    }
}
